#include<string>

using namespace std;
class Solution {
public:
    string replaceSpace(string s) {
        string str;

        for (auto &c : s)
        {
           if (c==' '){
             str.push_back('%');
             str.push_back('2');
             str.push_back('0');
           }else{
            str.push_back(c);
           }
        }
        return str;
    }
};